<style type="text/css">
.fui-tab-scroll {height: 2rem; background: #fff; overflow-y: hidden; overflow-x: auto; white-space: normal; position: relative;}
.fui-tab-scroll:after {content: ""; height: 1px; width: 100%; background: #efefef; position: absolute; left: 0; bottom: 0;}
.fui-tab-scroll .container{z-index: -1;  height:2.4rem; overflow: auto;  white-space:nowrap;}
.fui-tab-scroll .item {height:2rem; width:auto; overflow: hidden; line-height:2rem; text-decoration: none; color:#333; text-align: center; padding: 0.25rem 0.5rem; font-size: 0.7rem;}
.fui-tab-scroll .item.on  {color:#fe5455; font-weight: bold; position: relative;}
.fui-tab-scroll .item.on:before {content: ""; height: 2px; width: 100%; background: #fe5455; position: absolute; bottom: -0.2rem; left: 0;}
.fui-tab-scroll .type-3 .item{width:33.3%};
</style>
<div class="fui-page fui-page-current"  ng-if="pagedata.op == 'list'">
	<div class="fui-content">
		<div class="fui-cell-group fui-cell-click" style="margin-top:0">
				<div class="fui-cell">
					<div class="fui-cell-info">
						<div class="fui-cell-info text bold" style="font-size:1.2rem;color:#333">地块</div>
					</div>
				</div>
		</div>
		<div class="fui-tab-scroll" style="height:2rem">
			<div class='xcontainer'>
				<span ng-repeat="item in pagedata.groups" ng-class="{'item':1, 'on':pagedata.params.id == item.id}" href="javascript:" ng-click="pagedata.params.id=item.id;tool.get_list('jy_farmer/lclassify/land_list/',true)">{{item.title}}</span>
			</div>
		</div>
		<div class="jy-content">
		<div ng-repeat="item in pagedata.list" class="fui-picturew row-1 radius" style="background:#fff;margin-top:0.3rem">
				<a class="item" style="padding: 5px;" href="javascript:;" href="javascript:" ng-click="access_json('jy_farmer/lclassify/detail/id='+item.id)">
					<div class="image">
							<img ng-src="{{tomedia(item.image) || '../core/resource/images/nopic.jpg'}}">
					</div>
					<div class="title bold">{{item.title}}</div>
					<div class="subtitle center">简介：{{item.remark}}</div>
					<div><span style="color:#00c568">总面积{{item.unarea||'0'}}㎡ 剩余面积{{item.lastarea||'0'}}㎡ </span><span class="label label-danger r-f" style="background:#00c568" href="javascript:;" ng-click="access_json('jy_farmer/lclassify/detail/id='+item.id)">选择土地</span></div>
				</a>
		</div>
		<div ng-if="pagedata.list.length<=0" class="content-empty">
			<i class='icon icon-chakanpingjia'></i>
			<div>暂无任何土地</div>
		</div>
		</div>
		<div ng-show="pagedata.loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
	</div>
	<div ng-include="sys_html('_footer')"></div>
</div>
<div class="fui-page order-create-page fui-page-current" ng-if="pagedata.op == 'detail'">
	<div class="fui-content">
		<div class="fui-picture">
				<a style="display: block; padding: {paddingtop}px {paddingleft}px;" data-nocache="true">
					<img ng-src="{{tomedia(pagedata.item.image) || '../core/resource/images/nopic.jpg'}}">
				</a>
		</div>
		<div class="jy-content">
		<div class="fui-cell-group fui-cell-click" style="padding-bottom:0.3rem">
			<div class="fui-cell sm">
				<a class="fui-cell-text">{{pagedata.item.title}}</a>
			</div>
			<div class="fui-cell sm">
				<a class="fui-cell-text">总面积：{{pagedata.item.area}}㎡ | 已种植：{{pagedata.item.onarea || 0}}㎡ | 剩余可种植：{{pagedata.item.unarea}}㎡ </a>
			</div>
		</div>
		<div class="fui-cell-group fui-cell-click" style="padding-bottom:0.3rem">
			<div class="fui-cell sm">
				<a class="fui-cell-text">选择面积</a>
			</div>
			<div class="fui-cell sm">
				<div class="fui-cube-bg" style="background: #f3f3f3;">
						<div  class="fui-cube-left" style="border-right:2px solid  #fff">
							<div ng-click="pagedata.selectarea(6);pagedata.post.area =6;pagedata.areaid=0" ng-class="{'cube-bg':1,'active':pagedata.areaid==0}">6㎡ x ￥{{pagedata.item.price}}/㎡</div>
						</div>
						<div class="fui-cube-right">
									<div ng-click="pagedata.selectarea(2);pagedata.post.area =2;pagedata.areaid=1" ng-class="{'cube-bg':1,'active':pagedata.areaid==1}">2㎡ x ￥{{pagedata.item.price}}/㎡</div>
									<div ng-click="pagedata.selectarea(2);pagedata.post.area =2;pagedata.areaid=2" ng-class="{'cube-bg':1,'active':pagedata.areaid==2}">2㎡ x ￥{{pagedata.item.price}}/㎡</div>
									<div ng-click="pagedata.selectarea(2);pagedata.post.area =2;pagedata.areaid=3" ng-class="{'cube-bg':1,'active':pagedata.areaid==3}">2㎡ x ￥{{pagedata.item.price}}/㎡</div>
						</div>
				</div>
			</div>
			
		</div>
		<div class="fui-cell-group fui-cell-click">
			<div class="fui-cell sm">
				<a class="fui-cell-text">可种植作物</a>
			</div>
			<div class="fui-goods-group container block">
				<div ng-repeat="g in pagedata.item.seeds" class="fui-goods-item">
					  <a href="javascript:">
						  <div class="image" style="background-image: url('{{tomedia(g.image)}}')">
							
						  </div>
						</a>
					<div class="detail">
							<div class="name">{{g.title}}<span class="r-f">￥{{g.price}}/㎡</span></div>
							<div class="subtitle" style="font-size:0.6rem">产量:{{g.plant_time}}kg/㎡ | 周期:{{g.growtime}}天</div>
					</div>
				</div>
			</div>
		</div>
		<div class="fui-cell-group" style="padding:0.3rem">
			<div class="content-block content-images" ng-bind-html="trust(pagedata.item.content)"></div>
		</div>
		</div>
	</div>
	<div class="fui-navbar">
		<a class="nav-item favorite-item"><div class='subtitle l' style="font-size:0.7rem;padding-bottom:0.15rem;margin-left:0.3rem">合计:<span class="bigprice" style="font-weight:600"> ￥</span><span class='totalprice bigprice' style="font-weight:600;">{{pagedata.totalprice}}</span></div></a>
		<a href="javascript:;" ng-click="access_json('/buyland//id='+pagedata.item.id+'&area='+pagedata.post.area)" class="nav-item" style="background:#00c568;color:#fff">立即购买</a>
	</div>
</div>
<script>
scope.pagedata.areaid = 0;
scope.pagedata.post.area = 6;
//滚动加载
if(scope.pagedata.op=='list'){
	scope.tool.get_list('jy_farmer/lclassify/land_list/',true);
	scope.pagedata.scroll_bottom=function(){
		scope.tool.get_list('jy_farmer/lclassify/land_list/');
	}
}
if(scope.pagedata.item){
	scope.pagedata.totalprice = scope.pagedata.post.area * scope.pagedata.item.price;
}
scope.pagedata.selectarea=function(area){
	scope.pagedata.totalprice = area * scope.pagedata.item.price;
}
</script>
